
#ifndef _LSM303D_CONFIG_H
#define _LSM303D_CONFIG_H

/**
 * @brief 设备从地址配置,根据芯片引脚CAD0,CAD1电平配置
 * CAD1:CAD0 = 00   LSM303D_SLAVE_ADDRESS_00
 * CAD1:CAD0 = 01   LSM303D_SLAVE_ADDRESS_01
 * CAD1:CAD0 = 10   LSM303D_SLAVE_ADDRESS_10
 * CAD1:CAD0 = 11   LSM303D_SLAVE_ADDRESS_11
 */
#define LSM303D_SLAVE_ADDRESS   LSM303D_SLAVE_ADDRESS_00

/**
 * @brief 均值滤波长度配置
 * 不进行均值滤波：     LSM303D_AVERAGE_TIMES__NO_AVERAGE
 * 均值滤波长度为2：    LSM303D_AVERAGE_TIMES__AVERAGE_2
 * 均值滤波长度为4：    LSM303D_AVERAGE_TIMES__AVERAGE_4
 * 均值滤波长度为8：    LSM303D_AVERAGE_TIMES__AVERAGE_8
 * 均值滤波长度为16：   LSM303D_AVERAGE_TIMES__AVERAGE_16
 */
#define LSM303D_AVERAGE_TIMES   LSM303D_AVERAGE_TIMES__AVERAGE_4

/**
 * @brief 使能数据就绪中断信号
 * 1：enable
 * 0：disable
 */
#define DRDY_INT_ENABLE         		1

/* 断连时长阈值，超过此阈值会报错，需要重连 */
#define DISCONNECT_TIME_THRESHOLD_MS	15

#define CALIBRATION_ENABLE              0

/* 校准最低采样点个数 */
#define CALIBRATION_MIN_POINTS          10000

#define CALIBRATION_SAMPLE_PERIOD_MS    10      

#endif /* _LSM303D_CONFIG_H */
